#include<iostream>
#include<memory>
#include "mqtt_client.h"
int main(int avgc,char* avgs[]) {
    if(avgc != 2)
    {
        std::cout<<"请输入你要订阅到哪个主题"<<std::endl;
        exit(2);
    }
    const std::string BROKER_ADDRESS = "tcp://192.168.202.1:1883";
    const std::string CLIENT_ID = "my_first_subscriber";
    const std::string TOPIC = avgs[1];
    std::shared_ptr<MqttBase> sub = std::make_shared<MqttSubscriber>(BROKER_ADDRESS,CLIENT_ID,TOPIC,2);
    sub->Run();
    return 0;
}